package com.zmn.plat.manager.dictionary;

import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.zmn.common.dictionary.DictModel;
import com.zmn.common.dto.VtDTO;
import org.springframework.util.CollectionUtils;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * 描述：师傅字典
 *
 * @author wangjie
 * @since 2018/10/18 14:51
 */
public class MasterDict {

    /**
     * 描述:zmn师傅excel 导出表头
     *
     * @author wangjie
     * @since 11:48 2019/2/19
     **/
    public static final String[] ZMN_MASTER_EXCEL_TITLE = {"姓名", "手机号", "开户行", "开户名", "子公司", "服务公司", "省份", "城市", "合作类型", "服务分组", "是否主管", "绩效分类", "保险", "工作状态", "银联签约", "入职日期", "转正日期", "离职日期"};

    /**
     * 描述:sass 师傅excel 导出表头
     *
     * @author wangjie
     * @since 2019/8/26
     **/
    public static final String[] SASS_MASTER_EXCEL_TITLE = {"工程师ID", "工程师", "所属服务商", "省份", "城市", "主技能", "状态", "入职日期"};

    /**
     * 描述:cnhb 师傅excel 导出表头
     *
     * @author wangjie
     * @since 2019/8/26
     **/
    public static final String[] CNHB_MASTER_EXCEL_TITLE = {"工程师ID", "工程师", "子公司", "服务公司", "城市区域", "工程师分组", "类型", "状态", "绩效分类", "入职日期"};


    /**
     * 描述:师傅按单保险统计excel 导出表头 师傅维度
     *
     * @author wangjie
     * @since 11:48 2019/2/19
     **/
    public static final String[] MAST_INS_ORDER_MASTER_EXCEL = {"公司", "城市", "师傅", "总单量", "空调维修单量", "空调维修费用", "空调安装单量",
            "空调安装费用", "太阳能维修单量", "太阳能维修费用", "太阳能安装单量", "太阳能安装费用", "其他单量", "其他费用", "互助金小计", "保险小计", "总收费"};

    /**
     * 描述:师傅按单保险统计excel 导出表头 公司维度
     *
     * @author wangjie
     * @since 11:48 2019/2/19
     **/
    public static final String[] MAST_INS_ORDER_COMPANY_EXCEL = {"公司", "总单量", "空调维修单量", "空调维修费用", "空调安装单量",
            "空调安装费用", "太阳能维修单量", "太阳能维修费用", "太阳能安装单量", "太阳能安装费用", "其他单量", "其他费用", "互助金小计", "保险小计", "总收费"};


    /**
     * plat 师傅模块文件上传地址
     */
    public final static String MAST_MASTER_UPLOAD_IMAGES_PATH = "plat/master/";
    /**
     * plat 活动文件上传路径
     */
    public final static String MAST_ACTIVITY_UPLOAD_IMAGES_PATH = "plat/activity/";

    public final static String MAST_NONE = "无";

    /**
     * 是否签订合同：1未签订，2已签订
     */
    public final static int MASTER_IS_CONTRACT = 1;
    public final static int MASTER_IS_CONTRACT_TRUE = 2;
    /**
     * 是否购买保险：1未购买， 2购买
     */
    public final static int MASTER_IS_INSURANCE = 1;
    public final static int MASTER_IS_INSURANCE_TRUE = 2;

    /**
     * 新增
     */
    public final static int MASTER_LOG_TYPE_ADD = 1;
    /**
     * 停单
     */
    public final static int MASTER_LOG_TYPE_STOP_ORDER = 2;
    /**
     * 恢复接单
     */
    public final static int MASTER_LOG_TYPE_START_ORDER = 3;
    /**
     * 申请转正
     */
    public final static int MASTER_LOG_TYPE_APPLY_PASS = 4;
    /**
     * 转正
     */
    public final static int MASTER_LOG_TYPE_PASS = 5;
    /**
     * 工具
     */
    public final static int MASTER_LOG_TYPE_TOOL = 6;
    /**
     * 合同协议
     */
    public final static int MASTER_LOG_TYPE_CONTRACT = 7;
    /**
     * 申请离职
     */
    public final static int MASTER_LOG_TYPE_APPLY_DIMISSION = 8;
    /**
     * 离职审核
     */
    public final static int MASTER_LOG_TYPE_DIMISSION = 9;
    /**
     * 待岗
     */
    public final static int MASTER_LOG_TYPE_AWAIT_JOB = 10;
    /**
     * 技能
     */
    public final static int MASTER_LOG_TYPE_SKILL = 11;
    /**
     * 密码
     */
    public final static int MASTER_LOG_TYPE_PASSWORD = 12;
    /**
     * 请假审核
     */
    public final static int MASTER_LOG_TYPE_LEAVE = 13;
    /**
     * 取消请假
     */
    public final static int MASTER_LOG_TYPE_CANCEL_LEAVE = 14;
    /**
     * 申请调岗
     */
    public final static int MASTER_LOG_TYPE_APPLY_POST = 15;
    /**
     * 调岗
     */
    public final static int MASTER_LOG_TYPE_POST = 16;
    /**
     * 修改
     */
    public final static int MASTER_LOG_TYPE_EDIT = 17;
    /**
     * 保险协议
     */
    public final static int MASTER_LOG_TYPE_INSURANCE = 18;
    /**
     * 接单配置
     */
    public final static int MASTER_LOG_TYPE_ORDERCONFIG = 19;
    /**
     * 服务范围
     */
    public final static int MASTER_LOG_TYPE_SERVICE_SOCPE = 20;
    /**
     * 恢复接单
     */
    public final static int MASTER_LOG_TYPE_STOP_RESTORE_ORDER = 21;
    /**
     * 申请请假
     */
    public final static int MASTER_LOG_APPLY_LEAVE = 22;
    /**
     * 申请结束
     */
    public final static int MASTER_LOG_LEAVE_END = 23;


    public final static int MAST_SKILL_NO_VALID = 1;
    public final static int MAST_SKILL_VALID = 2;


    /**
     * 状态：1已转正(正常)，2请假中(停止派单) 3已离职， 4试用， 5转正审核中， 6待岗中，  7离职审核中， 8调岗审核中， 9转正审核失败， 10停单中， 11调岗审核失败， 12离职审核失败, 13 已调岗
     */
    public final static int NORMAL = 1;
    public final static int LEAVE = 2;
    public final static int DEPARTURE = 3;
    public final static int TRIAL = 4;
    public final static int POSITIVE_UNDER = 5;
    public final static int WAITING = 6;
    public final static int DEPARTURE_UNDER = 7;
    public final static int THE_POST_UNDER = 8;
    public final static int POSITIVE_UNDER_FAILURE = 9;
    public final static int STOP_ORDER = 10;
    public final static int THE_POST_UNDER_FAILURE = 11;
    public final static int DEPARTURE_UNDER_FAILURE = 12;
    public final static int MODULATED_DUTY = 13;
    /**
     * 描述：特殊情况：请假申请中
     */
    public final static int LEAVE_APPLY = 99;

    /**
     * 描述: 师傅申请通过
     *
     * @author wangjie
     * @since 15:18 2019/5/13
     **/
    public final static int APPLY_MASTER_APPROVE = 40;
    public final static int APPLY_MASTER_NOT_APPROVE = 30;
    public final static int APPLY_MASTER_MSG_WRONG = 30;

    /**
     * 师傅保险类型 1 普通类型 2 按单保险
     */
    public final static int INSURANCE_TYPE_COMMON = 1;
    public final static int INSURANCE_TYPE = 2;

    /**
     * 描述 师傅转正状态：1.待审核，2审核通过，3审核驳回
     */
    public final static int BECOME_TO_AUDIT = 1;
    public final static int BECOME_PASS = 2;
    public final static int BECOME_REJECTED = 3;

    /**
     * 描述:师傅离职状态：1.待审核，2审核通过，3审核驳回
     */
    public final static int LEAVEOFFICE_TO_AUDIT = 1;
    public final static int LEAVEOFFICE_PASS = 2;
    public final static int LEAVEOFFICE_REJECTED = 3;

    /**
     * 描述:师傅停单状态：1.待审核，2审核通过，3审核驳回4，取消
     */
    public final static int STOP_ORDER_TO_AUDIT = 1;
    public final static int STOP_ORDER_PASS = 2;
    public final static int STOP_ORDER_REJECTED = 3;
    public final static int STOP_ORDER_CANCEL = 4;
    public final static int STOP_ORDER_OVER = 5;


    /**
     * 描述:请假状态：10新建，20已申请，30审批通过，31审批被拒绝 40 取消 50结束
     */
    public final static int LEAVE_NEW = 10;
    public final static int LEAVE_APPLIED = 20;
    public final static int LEAVE_PASS = 30;
    public final static int LEAVE_REJECT = 31;
    public final static int LEAVE_CANCEL = 40;
    public final static int LEAVE_END = 50;

    /**
     * 描述:调岗状态： 状态：1待审核，2审核通过，3审核驳回
     */
    public final static int TRANSFER_TO_AUDIT = 1;
    public final static int TRANSFER_PASS = 2;
    public final static int TRANSFER_REJECTED = 3;

    /**
     * 描述:调岗合同保险延用状态： 状态：1 不延用 2 延用
     */
    public final static int TRANSFER_NOTCONTINUE = 1;
    public final static int TRANSFER_CONTINUE = 2;


    /**
     * 描述:执行人类型：1 员工、2师傅、3系统
     */
    public final static int MAST_OPERATOR_TYPE_STAFF = 1;
    public final static int MAST_OPERATOR_TYPE_MASTER = 2;
    public final static int MAST_OPERATOR_TYPE_SYSTEM = 3;

    /**
     * 描述:师傅保险需要乘的基数
     */
    public final static int SYSTEM_AMOUNT_BASE = 100;

    /**
     * 描述:师傅位置缓存接口 （如要添加师傅基本信息入缓存 则在这里添加key）
     */
    public final static String PLAT_MAST_TOUCH_LOCATION = "plat_mast_touch_location";
    public final static String PLAT_MAST_TOUCH_LOCATION_LON = "plat_mast_touch_location_lon";
    public final static String PLAT_MAST_TOUCH_LOCATION_LAT = "plat_mast_touch_location_lat";
    public final static String PLAT_MAST_TOUCH_MASTER_NAME = "plat_mast_master_name";
    public final static String PLAT_MAST_TOUCH_MASTER_MOBILE = "plat_mast_master_mobile";
    public final static String PLAT_MAST_TOUCH_MASTER_LOGIN_STATUS = "plat_mast_master_login_status";
    public final static String PLAT_MAST_TOUCH_MASTER_SESSIONID = "plat_mast_master_session_id";
    public final static String PLAT_MAST_TOUCH_MASTER_LOGIN_TIME = "plat_mast_touch_master_login_time";
    public final static String PLAT_MAST_TOUCH_MASTER_VERSION_WORK = "plat_mast_touch_master_version_work";
    public final static String PLAT_MAST_TOUCH_MASTER_VERSION_COMPLAINT = "plat_mast_touch_master_version_complaint";

    /**
     * 描述：位置缓存数据过期时间 (90天)
     */
    public final static int PLAT_MAST_TOUCH_LOCATION_OVERDUE_TIME = 90;


    public final static String PLAT_MAST_MASTER_LOCATION_CACHE_PREFIX = "plat:mast:master:";

    /**
     * 描述:师傅位置缓存修改时间key
     */
    public final static String PLAT_MAST_TOUCH_LOCATION_UPDATE_TIME = "plat_mast_touch_location_update_time";

    /**
     * 描述:每次心跳的间隔 单位（秒）
     */
    public final static int PLAT_MAST_TOUCH_INTERVAL = 30;

    /**
     * 描述:师傅心跳过期频率基数（次）
     */
    public final static int PLAT_MAST_TOUCH_FREQUENCY = 20;

    /**
     * 描述:圆的边数
     */
    public final static int PLAT_MAST_SCOPE_SIDES = 108;

    /**
     * 描述: GIS 米与度的转换公式 一个具体的数值
     */
    public final static double PLAT_MAST_SCOPE_CILOMETTER = 0.0000089932202929999989;


    /**
     * 描述: 地图上服务范围类型 ：1多边形，2圆形
     */
    public final static int PLAT_MAST_SCOPE_SCOPETYPE_POLYGON = 1;
    public final static int PLAT_MAST_SCOPE_SCOPETYPE_CIRCULAR = 2;

    /**
     * 描述: 师傅在线日志模块mongo 标识
     */
    public final static String PLAT_MAST_ONLINE_MONGO = "mast_online_log";

    /**
     * 描述: 师傅位置日志模块mongo 标识
     */
    public final static String PLAT_MAST_LOCATION_MONGO = "mast_location_log";

    /**
     * 描述: 师傅登录状态值（1、离线，已登录）
     */
    public final static String PLAT_MAST_MASTER_LOING_STATUS = "_mastLoginStatus";
    public final static int PLAT_MAST_MASTER_LOGIN_STATUS_ON = 2;
    public final static int PLAT_MAST_MASTER_LOGIN_STATUS_OFF = 1;

    /**
     * 描述: 师傅第一次心跳记录key
     */
    public final static String PLAT_MAST_MASTER_FIRST_HEARTBEAT_TIME = "_firstHeartbeat_time";

    public final static String PLAT_MAST_MASTER_ID = "_master_id";

    /**
     * 描述: 师傅在线状态
     */
    public final static int SUCC_VALID_MASTER = 1;
    public final static int FAIL_INVALID_MASTER = 2;
    public final static int FAIL_INVALID_SESSION = 4;

    /**
     * 描述: 是否师傅主管  是否师傅主管：1不是，2是
     */
    public final static int PLAT_MAST_MASTER_MANAGER_YES = 1;
    public final static int PLAT_MAST_MASTER_MANAGER_NOT = 2;

    /**
     * 描述: 师傅技能日志类型  1，添加，2 删除
     */
    public final static int PLAT_MAST_MASTER_SKILL_LOG_ADD = 1;
    public final static int PLAT_MAST_MASTER_SKILL_LOG_DELETE = 2;
    public final static String PLAT_MAST_MASTER_SKILL_LOG_ADD_STR = ": 无 -> 有";
    public final static String PLAT_MAST_MASTER_SKILL_LOG_DELETE_STR = ": 有 -> 无";

    /**
     * 描述: 师傅版本号key  类型（1，工单版本号，2，投诉版本号）
     */
    public final static int PLAT_MAST_MASTER_VERSION_WORK = 1;
    public final static int PLAT_MAST_MASTER_VERSION_COMPLAINT = 2;

    /**
     * 描述: 合同状态，1已签订，2已过期 3 未签订,4快到期
     */
    public final static int PLAT_MAST_MASTER_CONTRACT_SIGNED = 1;
    public final static int PLAT_MAST_MASTER_VERSION_OVERDUE = 2;
    public final static int PLAT_MAST_MASTER_VERSION_NO = 3;
    public final static int PLAT_MAST_MASTER_VERSION_EXPIRING = 4;


    /**
     * 投诉状态指派
     */
    public final static int COMPLAIN_STATUS_ASSIGN = 20;
    /**
     * 投诉状态已处理
     */
    public final static int COMPLAIN_STATUS_HANDLER = 30;

    /**
     * 合作类型 1直营，2加盟，3承包
     */
    public final static Integer PROXY_TYPE_DIRECT = 1;
    public final static Integer PROXY_TYPE_JOIN = 2;
    public final static Integer PROXY_TYPE_CONTRACT = 3;

    /**
     * 描述: 空调维修系数
     *
     * @author wangjie
     * @since 11:11 2019/5/29
     **/
    public final static Double CONDITIONING_MAINTENANCE_COEFFICIENT = 0.8;
    /**
     * 描述: 空调安装系数
     *
     * @author wangjie
     * @since 11:11 2019/5/29
     **/
    public final static Double CONDITIONING_INSTALLATION_COEFFICIENT = 0.8;
    /**
     * 描述: 太阳能维修系数
     *
     * @author wangjie
     * @since 11:12 2019/5/29
     **/
    public final static Double SOLAR_MAINTENANCE_COEFFICIENT = 0.8;
    /**
     * 描述: 太阳能安装系数
     *
     * @author wangjie
     * @since 11:12 2019/5/29
     **/
    public final static Double SOLAR_INSTALLATION_COEFFICIENT = 0.8;
    /**
     * 描述: 其他费用系数
     *
     * @author wangjie
     * @since 11:12 2019/5/29
     **/
    public final static Double OTHER_FEES_COEFFICIENT = 0.2;
    /**
     * 描述: 互助金系数
     *
     * @author wangjie
     * @since 11:12 2019/5/29
     **/
    public final static Double MUTUAL_GOLD_COEFFICIENT = 0.1;
    /**
     * 描述: 系数放大倍数
     *
     * @author wangjie
     * @since 11:12 2019/5/29
     **/
    public final static Integer COEFFICIENT_MAGNIFICATION = 100;

    /**
     * 描述: 代理商标志：1直营，2加盟，3承包
     *
     * @author wangjie
     * @since 14:27 2019/6/17
     **/
    public final static Integer MASTER_AGENT_CONTRACTOR = 3;

    /**
     * 描述: list 分组长度 超过该长度则进行分组炒作
     *
     * @author wangjie
     * @since 14:27 2019/7/16
     **/
    public static final Integer BASE_MYSQL_LENGTH = 1000;

    /**
     * 描述: 师傅模块盐值长度
     *
     * @author wangjie
     * @since 2019/9/18
     **/
    public static final Integer MASTER_SALT_LENGTH = 15;

    /**
     * 银联自助签约状态-签约中
     */
    public final static Integer CHIANUSM_AUTOREG_STATUS_DOING = 1;

    /**
     * 银联自助签约状态-入网成功
     */
    public final static Integer CHIANUSM_AUTOREG_STATUS_SUCCESS = 4;

    /**
     * 银联自助签约状态-入网失败
     */
    public final static Integer CHIANUSM_AUTOREG_STATUS_FAIL = 3;

    /**
     * 描述: 银联支付 1关闭.2 开启
     *
     * @author wangjie
     * @since 2019/10/9
     **/
    public final static Integer MASTER_UNIONPAY_DISABLE = 1;
    public final static Integer MASTER_UNIONPAY_ENABLE = 2;

    /**
     * 描述: 银联划付签约状态用于页面展示 签约状态：资料填写中
     * 未写入任何数据
     *
     * @author wangjie
     * @since 2019/10/10
     **/
    public final static Integer MASTER_UNIONPAY_STSTUS_DATA_ENTRY = 1;

    /**
     * 描述:银联划付签约状态用于页面展示 签约状态：审核失败
     * 对应 银联自助签约状态-入网失败 CHIANUSM_AUTOREG_STATUS_FAIL
     *
     * @author wangjie
     * @since 2019/10/10
     **/
    public final static Integer MASTER_UNIONPAY_STSTUS_FAILURE = 2;

    /**
     * 描述:银联划付签约状态用于页面展示 签约状态：审核中
     * 对应 银联自助签约状态-入网失败 CHIANUSM_AUTOREG_STATUS_DOING
     *
     * @author wangjie
     * @since 2019/10/10
     **/
    public final static Integer MASTER_UNIONPAY_STSTUS_DOING = 3;

    /**
     * 描述:银联划付签约状态用于页面展示 签约状态：签约成功
     * 对应 银联自助签约状态-入网失败 CHIANUSM_AUTOREG_STATUS_SUCCESS
     *
     * @author wangjie
     * @since 2019/10/10
     **/
    public final static Integer MASTER_UNIONPAY_STSTUS_SUCCESS = 4;

    /**
     * 描述: 银联划付 未通过审核提示语
     *
     * @author wangjie
     * @since 2019/10/10
     **/
    public final static String MASTER_UNIONPAY_PROMPT_STR = "审核通过后，才可配置";

    /**
     * 描述:银联划付签约状态用于页面展示 字典数据
     *
     * @return java.util.List<com.zmn.common.dictionary.DictModel>
     * @author wangjie
     * @since 2019/10/10
     **/
    public static List<DictModel> getMasterUnionpayDictList() {
        ArrayList<DictModel> items = Lists.newArrayListWithExpectedSize(MASTER_UNIONPAY_STSTUS_SUCCESS);
        items.add(new DictModel(MASTER_UNIONPAY_STSTUS_DATA_ENTRY, "资料填写中"));
        items.add(new DictModel(MASTER_UNIONPAY_STSTUS_FAILURE, "审核失败"));
        items.add(new DictModel(MASTER_UNIONPAY_STSTUS_DOING, "审核中"));
        items.add(new DictModel(MASTER_UNIONPAY_STSTUS_SUCCESS, "签约成功"));
        return items;
    }

    /**
     * 描述: 师傅修改日志执行人类型集合 员工、师傅、系统
     *
     * @return java.util.List<com.zmn.common.dictionary.DictModel>
     * @author wangjie
     * @since 2018/11/19 17:53
     */
    public static List<DictModel> getMastChangeLogOperatorTypeList() {
        return new ArrayList<DictModel>(3) {{
            add(new DictModel(1, "员工"));
            add(new DictModel(2, "师傅"));
            add(new DictModel(3, "系统"));
        }};
    }

    /**
     * 描述: 师傅修改日志操作类型集合 变更类型：1新增，2停单，3恢复接单，4申请转正，5转正，6工具，7合同协议，8申请离职，9离职，10待岗，11技能，12密码，13请假，14取消请假，15申请调岗，16调岗，17修改
     *
     * @return java.util.List<com.zmn.common.dictionary.DictModel>
     * @author wangjie
     * @since 2018/11/19 17:58
     */
    public static List<DictModel> getMastChangeLogTypeList() {
        return new ArrayList<DictModel>(18) {{
            add(new DictModel(1, "新增"));
            add(new DictModel(2, "停单"));
            add(new DictModel(3, "恢复接单"));
            add(new DictModel(4, "申请转正"));
            add(new DictModel(5, "转正审核"));
            add(new DictModel(6, "工具"));
            add(new DictModel(7, "合同"));
            add(new DictModel(8, "申请离职"));
            add(new DictModel(9, "离职审核"));
            add(new DictModel(10, "待岗"));
            add(new DictModel(11, "技能"));
            add(new DictModel(12, "密码"));
            add(new DictModel(13, "请假审核"));
            add(new DictModel(14, "取消请假"));
            add(new DictModel(15, "申请调岗"));
            add(new DictModel(16, "调岗审核"));
            add(new DictModel(17, "修改"));
            add(new DictModel(18, "保险"));
            add(new DictModel(19, "接单数量"));
            add(new DictModel(20, "服务范围"));
            add(new DictModel(21, "恢复接单"));
            add(new DictModel(22, "申请请假"));
            add(new DictModel(23, "请假结束"));
        }};
    }

    /**
     * 描述:MastInsuranceType
     *
     * @author wangjie
     * @since 2018/10/26 10:14
     */
    public static List<DictModel> getMastInsuranceTypeList() {
        List<DictModel> items = new ArrayList<>();
        items.add(new DictModel(1, "普通保险"));
        items.add(new DictModel(2, "按单保险"));
        return items;
    }

    /**
     * 描述:MastReplaced
     *
     * @author wangjie
     * @since 2018/10/26 10:14
     */
    public static List<DictModel> getMastReplacedList() {
        List<DictModel> items = new ArrayList<>();
        items.add(new DictModel(1, "非顶替"));
        items.add(new DictModel(2, "顶替"));
        return items;
    }

    /**
     * 描述:ContractType
     *
     * @author wangjie
     * @since 2018/10/26 10:14
     */
    public static List<DictModel> getContractTypeList() {
        List<DictModel> items = new ArrayList<>();
        items.add(new DictModel(1, "劳动合同"));
        items.add(new DictModel(2, "居间协议"));
        return items;
    }

    /**
     * 描述:获得户口类型 1农业，2非农业
     *
     * @author wangjie
     * @since 2018/10/30 10:14
     */
    public static List<DictModel> getCensusRegisterTypeList() {
        return new ArrayList<DictModel>(2) {{
            add(new DictModel(1, "农业"));
            add(new DictModel(2, "非农业"));
        }};
    }

    /**
     * 描述:获得学历 （初中及以下，高中，大专，本科及以上）
     *
     * @author wangjie
     * @since 2018/10/30 10:14
     */
    public static List<DictModel> getEducationList() {
        return new ArrayList<DictModel>(4) {{
            add(new DictModel(1, "初中及以下"));
            add(new DictModel(2, "高中"));
            add(new DictModel(3, "大专"));
            add(new DictModel(4, "本科及以上"));
        }};
    }

    /**
     * 描述:获得代理商类型 （代理商标志：1直营，2加盟，3承包 ps:对应原型上的合作类型）
     *
     * @author wangjie
     * @since 2018/10/30 10:14
     */
    public static List<DictModel> getAgentList() {
        return new ArrayList<DictModel>(4) {{
            add(new DictModel(1, "直营"));
            add(new DictModel(2, "非直营"));
        }};
    }

    /**
     * 描述: 申请平台：1WAP端，2APP，3PC
     *
     * @author wangjie
     * @since 2018/11/1 21:59
     */
    public static List<VtDTO> getPlatformList() {
        return new ArrayList<VtDTO>(4) {{
            add(new VtDTO(1, "WAP端"));
            add(new VtDTO(2, "APP"));
            add(new VtDTO(3, "PC端"));
        }};
    }

    /**
     * 描述: 合同状态：1未到期，2已过期,3未签订，4快到期
     *
     * @author lishuangjiang
     * @since 2019/3/19 15:19
     */
    public static List<VtDTO> getContractList() {
        return new ArrayList<VtDTO>(4) {{
            add(new VtDTO(3, "未签订"));
            add(new VtDTO(1, "未到期"));
            add(new VtDTO(4, "快到期"));
            add(new VtDTO(2, "已到期"));
        }};
    }

    /**
     * 描述: 普通保险：1 未购买，2 未到期,3 快到期，4 已到期
     *
     * @author lishuangjiang
     * @since 2019/3/19 15:19
     */
    public static List<VtDTO> getInsuranceList() {
        return new ArrayList<VtDTO>(4) {{
            add(new VtDTO(1, "未购买"));
            add(new VtDTO(2, "未到期"));
            add(new VtDTO(3, "快到期"));
            add(new VtDTO(4, "已到期"));
        }};
    }

    /**
     * 描述: 按单保险：1 未购买，2 已购买
     *
     * @author lishuangjiang
     * @since 2019/3/19 15:19
     */
    public static List<VtDTO> getOrderInsuranceList() {
        return new ArrayList<VtDTO>(4) {{
            add(new VtDTO(1, "未购买"));
            add(new VtDTO(2, "已购买"));
        }};
    }

    /**
     * 描述: 推荐人奖励状态：1未发放，2已发放
     *
     * @author wangjie
     * @since 2018/11/1 22:01
     */
    public static List<VtDTO> getRewardStatusList() {
        return new ArrayList<VtDTO>(4) {{
            add(new VtDTO(1, "未发放"));
            add(new VtDTO(2, "已发放"));
        }};
    }

    /**
     * 描述:接受奖励的账户：1申请人自己，2推荐人账户
     *
     * @author wangjie
     * @since 2018/11/1 22:03
     */
    public static List<VtDTO> getRewardAccountList() {
        return new ArrayList<VtDTO>(4) {{
            add(new VtDTO(1, "申请人自己"));
            add(new VtDTO(2, "推荐人账户"));
        }};
    }

    /**
     * 描述:状态：10新申请，20信息有误，30审核未通过，40审核通过
     *
     * @author wangjie
     * @since 2018/11/1 22:03
     */
    public static List<VtDTO> getApplyStatusList() {
        return new ArrayList<VtDTO>(4) {{
            add(new VtDTO(10, "新申请"));
            add(new VtDTO(20, "信息有误"));
            add(new VtDTO(30, "审核未通过"));
            add(new VtDTO(40, "审核通过"));
        }};
    }

    /**
     * 描述: 言而有信师傅审核状态设置
     *
     * @return java.util.ArrayList<com.zmn.common.dto.VtDTO>
     **/
    public static ArrayList<VtDTO> getYeyxMasterStatus() {
        return new ArrayList<VtDTO>(3) {{
            add(new VtDTO(10, "新申请"));
            add(new VtDTO(30, "审核未通过"));
            add(new VtDTO(40, "审核通过"));
        }};
    }

    /**
     * 描述: 申请类型：1自己申请，2熟人推荐
     *
     * @return java.util.List<com.zmn.common.dto.VtDTO>
     * @author wangjie
     * @since 2018/11/2 11:00
     */
    public static List<VtDTO> getApplyTypeList() {
        return new ArrayList<VtDTO>(4) {{
            add(new VtDTO(1, "自己申请"));
            add(new VtDTO(2, "熟人推荐"));
        }};
    }

    /**
     * 描述: 请假类型：1事假， 2病假， 3婚假， 4年假， 5产假， 6丧假， 7其它
     *
     * @return java.util.ArrayList<com.zmn.common.dto.VtDTO>
     * @author wangjie
     * @since 2018/11/8 16:25
     */
    public static ArrayList<VtDTO> getLeaveTypeList() {
        return new ArrayList<VtDTO>(7) {{
            add(new VtDTO(1, "事假"));
            add(new VtDTO(2, "病假"));
            add(new VtDTO(3, "婚假"));
            add(new VtDTO(4, "年假"));
            add(new VtDTO(5, "产假"));
            add(new VtDTO(6, "丧假"));
            add(new VtDTO(7, "其它"));
        }};
    }

    /**
     * 描述:请假状态：10新建，20已申请，30审批通过，31审批被拒绝 40 取消
     *
     * @return java.util.ArrayList<com.zmn.common.dto.VtDTO>
     * @author wangjie
     * @since 2018/11/8 16:31
     */
    public static ArrayList<VtDTO> getLeaveStatueList() {
        return new ArrayList<VtDTO>(7) {{
            add(new VtDTO(20, "已申请"));
            add(new VtDTO(30, "审批通过"));
            add(new VtDTO(31, "审批被拒绝"));
            add(new VtDTO(40, "取消"));
            add(new VtDTO(50, "结束"));
        }};
    }

    /**
     * 描述:师傅转正状态：1.待审核，2审核通过，3审核驳回
     *
     * @return java.util.ArrayList<com.zmn.common.dto.VtDTO>
     * @author wangjie
     * @since 2018/11/9 14:32
     */
    public static ArrayList<VtDTO> getBecomeStatueList() {
        return new ArrayList<VtDTO>(3) {{
            add(new VtDTO(1, "待审核"));
            add(new VtDTO(2, "审核通过"));
            add(new VtDTO(3, "审核驳回"));
        }};
    }

    /**
     * 描述: 获取请假状态集合 请假状态：10新建，20已申请，30审批通过，31审批被拒绝
     *
     * @return java.util.ArrayList<com.zmn.common.dto.VtDTO>
     * @author wangjie
     * @since 2018/11/14 12:01
     */
    public static ArrayList<VtDTO> geLeaveStatueList() {
        return new ArrayList<VtDTO>(3) {{
            add(new VtDTO(10, "新建"));
            add(new VtDTO(20, "已申请"));
            add(new VtDTO(30, "审批通过"));
            add(new VtDTO(40, "审批被拒绝"));
        }};
    }

    /**
     * 描述: master
     *
     * @return java.util.List<com.zmn.common.dictionary.DictModel>
     * @author wangjie
     * @since 17:34 2019/7/9
     **/
    public static List<DictModel> getMasterState() {
        List<DictModel> items = new ArrayList<>();
        items.add(new DictModel(4, "试用"));
        items.add(new DictModel(6, "待岗中"));
        items.add(new DictModel(5, "转正审核中"));
        items.add(new DictModel(1, "已转正(正常)"));
        items.add(new DictModel(10, "停单中"));
        items.add(new DictModel(8, "调岗审核中"));
        items.add(new DictModel(2, "请假中(停止派单)"));
        items.add(new DictModel(7, "离职审核中"));
        items.add(new DictModel(3, "已离职"));
        return items;
    }

    @SuppressWarnings("Duplicates")
    public static List<DictModel> getGenderList() {

        List<DictModel> items = new ArrayList<>();
        items.add(new DictModel(1, "男"));
        items.add(new DictModel(2, "女"));
        return items;
    }

    /**
     * 描述: 否购买保险：1未购买， 2购买
     */
    public static List<DictModel> getMasterInsuranceList() {
        List<DictModel> items = new ArrayList<>();
        items.add(new DictModel(1, "未购买"));
        items.add(new DictModel(2, "购买"));
        return items;
    }

    /**
     * 描述:合同状态，1已签订，2已过期
     */
    public static List<DictModel> getMasterContractList() {
        List<DictModel> items = new ArrayList<>();
        items.add(new DictModel(1, "已签订"));
        items.add(new DictModel(2, "已过期"));
        items.add(new DictModel(3, "未签订"));
        items.add(new DictModel(4, "快到期"));
        return items;
    }

    /**
     * 描述:沿用合同：1不沿用，2沿用
     */
    public static List<DictModel> getFollowContractList() {
        List<DictModel> items = new ArrayList<>();
        items.add(new DictModel(1, "重新签订"));
        items.add(new DictModel(2, "延用"));
        return items;
    }

    /**
     * 描述:沿用保险：1不沿用，2沿用
     */
    public static List<DictModel> getFollowInsuranceList() {
        List<DictModel> items = new ArrayList<>();
        items.add(new DictModel(1, "重新购买"));
        items.add(new DictModel(2, "延用"));
        return items;
    }

    /**
     * 描述: 地图上服务范围类型 ：1多边形，2圆形
     */
    public static List<DictModel> getServiceScopeTypeList() {
        List<DictModel> items = new ArrayList<>();
        items.add(new DictModel(1, "多边形"));
        items.add(new DictModel(2, "圆形"));
        return items;
    }

    /**
     * 描述:获得是否师傅主管
     */
    public static List<DictModel> getMasterManagerTypeList() {
        List<DictModel> items = new ArrayList<>();
        items.add(new DictModel(1, "不是"));
        items.add(new DictModel(2, "是"));
        return items;
    }

    /**
     * 描述:师傅在线状态list
     *
     * @return java.util.List<com.zmn.common.dictionary.DictModel>
     * @author wangjie
     * @since 17:00 2019/6/11
     **/
    public static List<DictModel> getMasterLoginStatus() {
        List<DictModel> items = new ArrayList<>();
        items.add(new DictModel(PLAT_MAST_MASTER_LOGIN_STATUS_ON, "已登录"));
        items.add(new DictModel(PLAT_MAST_MASTER_LOGIN_STATUS_OFF, "离线"));
        return items;
    }

    /**
     * 描述: vtDtoList to Maps
     *
     * @param var VtDto list
     * @return java.util.Map<java.lang.Integer, java.lang.String>
     * @author wangjie
     * @since 16:56 2019/6/6
     **/
    public static Map<Integer, String> vtDtoToMap(List<VtDTO> var) {

        if (CollectionUtils.isEmpty(var)) {
            return Maps.newHashMap();
        }
        return var
                .stream()
                .collect(Collectors.toMap(VtDTO::getValue, VtDTO::getText));
    }

    /**
     * 描述: dictModel to Maps
     *
     * @param var VtDto list
     * @return java.util.Map<java.lang.Integer, java.lang.String>
     * @author wangjie
     * @since 16:56 2019/6/6
     **/
    public static Map<Integer, String> dictModelToMap(List<DictModel> var) {

        if (CollectionUtils.isEmpty(var)) {
            return Maps.newHashMap();
        }
        return var
                .stream()
                .collect(Collectors.toMap(DictModel::getKey, DictModel::getValue));
    }

    /**
     * 工程师技术等级 1.试用，2.初级,3.中级,4.高级，5.特级，6.首席
     */
    public final static int TECH_GRADE_THE_TRIAL = 1;
    public final static String TECH_GRADE_THE_TRIAL_STR = "试用";
    public final static int TECH_GRADE_THE_PRIMARY = 2;
    public final static String TECH_GRADE_THE_PRIMARY_STR = "初级";
    public final static int TECH_GRADE_THE_MIDDLE_RANK = 3;
    public final static String TECH_GRADE_THE_MIDDLE_RANK_STR = "中级";
    public final static int TECH_GRADE_THE_SENIOR = 4;
    public final static String TECH_GRADE_THE_SENIOR_STR = "高级";
    public final static int TECH_GRADE_THE_SUPER = 5;
    public final static String TECH_GRADE_THE_SUPER_STR = "特级";
    public final static int TECH_GRADE_THE_CHIEF = 6;
    public final static String TECH_GRADE_THE_CHIEF_STR = "首席";

    /**
     * 描述:工程师技术等级 :1.试用 2.初级 3.中级 4.高级 5.特级 6.首席
     *
     * @return java.util.List<com.zmn.common.dictionary.DictModel>
     * @author tanghongjun
     * @since 2019/11/20 10:18
     **/
    public static List<DictModel> getTechGradelist() {
        ArrayList<DictModel> arrayList = Lists.newArrayListWithExpectedSize(TECH_GRADE_THE_CHIEF);
        arrayList.add(new DictModel(TECH_GRADE_THE_TRIAL, TECH_GRADE_THE_TRIAL_STR));
        arrayList.add(new DictModel(TECH_GRADE_THE_PRIMARY, TECH_GRADE_THE_PRIMARY_STR));
        arrayList.add(new DictModel(TECH_GRADE_THE_MIDDLE_RANK, TECH_GRADE_THE_MIDDLE_RANK_STR));
        arrayList.add(new DictModel(TECH_GRADE_THE_SENIOR, TECH_GRADE_THE_SENIOR_STR));
        arrayList.add(new DictModel(TECH_GRADE_THE_SUPER, TECH_GRADE_THE_SUPER_STR));
        arrayList.add(new DictModel(TECH_GRADE_THE_CHIEF, TECH_GRADE_THE_CHIEF_STR));
        return arrayList;
    }




}
